{% extends "base.html" %}
{% block neirong %}
    <style>

    </style>
    <form name="form1" id="form1" action="{% url "regiter_do" %}" method="post">
    {% csrf_token %}
    <div class="form_">
        <ul>
  <li> <span class = "shurukuang">用户名： </span><input type="text" id="account" name="account"></li>
   <li>   <span  class = "shurukuang">密码： </span><input type="text" id="password" name="password"></li>
    <li>  <span  class = "shurukuang">&nbsp;</span><input type="button" onclick="regiter()" value="注册"></li>
            </ul>
        </div>
    </form>
    <script language="javascript">
        function regiter()
        {
            $biao = 1;
            if($("#account").val()=='')
            {
                alert('请输入用户名');
                $("#account").focus();
                $biao = 0;
            }
            if($("#password").val()=='' && $biao ==1)
            {
                alert("请输入密码");
                $("#password").focus();
                $biao = 0;
            }
            if($biao == 1)
            {
                $("#form1").submit();
            }
        }
    </script>
{% endblock %}